package org.utils.util;

import java.util.Comparator;

/**
 * Comparator for Integers
 */
public class IntegerComparator implements Comparator
{
  public IntegerComparator()
  {
  }
  /**
   * Compare the two integers by calling the Integer's compareTo() method.
   */
  public int compare(Object o1, Object o2)
  {
    return ((Integer) o1).compareTo((Integer) o2);
  }
  /**
   * Return true fi obj is an instance of IntegerComparator
   */
  public boolean equals(Object obj)
  {
    return (obj instanceof IntegerComparator);
  }
}
